import 'package:flutter/material.dart';

/**
 * unnecessary
 */
class FTextView extends StatefulWidget {

  final String content;

  _FTextView tvState;

  FTextView({this.content}) {
    if (content != null)
      tvState = _FTextView(content: content);
    else
      tvState = _FTextView();
  }

  void setText(String content) {
    tvState.setText(content);
  }

  @override
  _FTextView createState() {
    return tvState;
  }
}

class _FTextView extends State<FTextView> {

  _FTextView({String content}) {
    if (content != null)
      this.content = content;
  }

  void setText(String newText) {
    setState(() {
      content = newText;
    });
  }

  String content = "default";

  @override
  Widget build(BuildContext context) {
    return Text(content);
  }
}